{extend name="extra@index/base" /}
{block name="title"}店铺管理{/block}

{block name="css"}

{/block}


{block name='page'}


<link href="/static/weui/css/Hui.css" rel="stylesheet" type="text/css"/>
<link href="/static/weui/css/weui.min.css" rel="stylesheet" type="text/css"/>
<style type="text/css">

    body {
        font-size: .75rem;
    }

    .H-button {
        min-width: 20px;
        padding: 0 3px;
        border-radius: 3px;
        height: 18px;
        line-height: 14px;
    }

    #list1, #pane, #zt {
        opacity: 0;
        -webkit-transition: all 0.5s;
        position: relative;
    }

    #list1 {
        top: 20px
    }

    #pane {
        top: 100px;
    }

    #zt {
        top: 50px;
    }

    #zt:before {
        height: 0;
        border-top: none;
    }

    #pane img {
        width: 48px;
    }

    .top-t {
        height: 48px;
        display: inline-block;
        line-height: 48px;
        font-size: 20px;
        padding-left: 28px;
    }

    .big {
        position: absolute;
        width: 58px !important;
        left: 5%;
    }

    .H-width-avg-4:active {
        background: #eee
    }
</style>

<div id="vue">

    <div class="card-header" style="background: #09f;color: #fff;text-align: center">
        <div style="margin:0 auto">店铺管理</div>

    </div>

    <div id="list1"
         class="H-border-radius3-px H-theme-background-color-white H-margin-vertical-bottom-5 H-border-vertical-both-after H-border-horizontal-both-after">
        <div class="H-padding-10 H-border-vertical-bottom-after H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box">
        <span class="H-display-block H-flex-item H-text-align-left"><i
                class="H-iconfont H-icon-where H-font-size-14 H-display-inline-block"></i> <span
                id="address">我的地址</span> /  起送价:2.00</span>
            <span class="H-display-block H-text-align-right H-theme-font-color7-active"><span
                    class="H-badge H-display-inline-block"> <label
                    class="H-display-inline-block H-vertical-middle H-theme-background-color1 H-theme-font-color-white H-font-size-12"
                    id="type">{{shop.Type}}</label> </span> <span
                    class="H-badge H-display-inline-block"> </span> </span>
        </div>
        <div class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after">
            <div class="H-padding-vertical-both-10">
                <img src="/static/weui/image/logo.png" srcs="" alt="" title=""
                     class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 60px; height: 60px;"
                     id="logo"/>
            </div>
            <div class="H-flex-item H-padding-10">
                <strong class="H-font-weight-normal font-weight-500 H-font-size-16 H-display-block H-text-show-row-1"
                        id="name">{{shop.ShopName}}</strong>
                <div class="H-padding-vertical-bottom-2"></div>
                <div class="H-font-size-14 H-theme-font-color-999 H-text-show-row-1">
                    共有5种商品
                </div>
                <div class="H-padding-vertical-bottom-2"></div>
                <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-2">
                    <span id="status"></span>
                    <button class="H-button H-font-size-12 H-outline-none H-theme-background-color-transparent H-theme-font-color2 H-theme-border-color2 H-theme-border-color2-click H-theme-background-color2-click H-theme-font-color2-click">
                        送到寝室
                    </button>
                </div>
            </div>
        </div>
        <div class="H-padding-10 H-border-vertical-bottom-after H-theme-font-color-999 H-font-size-14">
            <i class="H-iconfont H-icon-SSID H-font-size-14 H-display-inline-block H-theme-background-color9 H-text-align-center H-theme-font-color-white"
               style="width:20px"></i><span id="note">{{shop.Description}}</span>
        </div>
    </div>
    <div class="weui_cell weui_cell_switch" id="zt">
        <div class="weui_cell_hd weui_cell_primary">
            营业状态
        </div>
        <div class="weui_cell_ft">
            <input class="weui_switch" type="checkbox" id="s">
        </div>
    </div>
    <div id="pane">
        <div class="H-n-grid H-border-vertical-top-after H-clear-both H-overflow-auto">
            <div class="H-clear-both H-width-100-percent H-display-table H-box-sizing-border-box">
                <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-2 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                     style="min-height: 80px;">
                    <div>
                    <span class="H-icon H-display-block H-horizontal-center"><img
                            src="/static/weui/image/icon/money.png"
                            class="big"/><span
                            class="top-t">今日收入</span></span>
                        <label class="n H-display-block H-font-size-22 H-theme-font-color-999 H-text-align-right">12.00</label>
                    </div>
                </div>
                <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-2 H-center-all H-theme-background-color-white H-border-vertical-bottom-after H-padding-vertical-both-10"
                     style="min-height: 80px;">
                    <div>
                    <span class="H-icon H-display-block H-horizontal-center"><img
                            src="/static/weui/image/icon/order.png"
                            class="big"/><span
                            class="top-t">今日订单</span></span>
                        <label class="n H-display-block H-font-size-22 H-theme-font-color-999 H-text-align-right">23</label>
                    </div>
                </div>
            </div>
        </div>
        <div class="H-clear-both H-width-100-percent H-display-table H-box-sizing-border-box">
            <div onclick="H.openWin('goods_head', 'goods_head.html')"
                 class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                    <span class="H-icon H-display-block H-horizontal-center"><img
                            src="/static/weui/image/icon/goods.png"/></span>
                    <label class="H-display-block H-font-size-14">商品管理</label>
                </div>
            </div>
            <div onclick="$.router.load('/master/index/order',true)"
                 class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                    <span class="H-icon H-display-block H-horizontal-center"><img
                            src="/static/weui/image/icon/order.png"/></span>
                    <label class="H-display-block H-font-size-14">订单管理</label> {if condition="newMaster()"}
                    <span class="badge" style="display: inline-block;
    padding: .1rem .45rem .15rem;
    font-size: .6rem;
    line-height: 1;
    color: #3d4145;
    background-color: rgba(0,0,0,.15);
    border-radius: 5rem;
    position: absolute;
    top: 15px;
    right: 15px;
    background: red;
    color: #fff;">{:newMaster()}</span>
                    {/if}
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                <span class="H-icon H-display-block H-horizontal-center"><img
                        src="/static/weui/image/icon/sata.png"/></span>
                    <label class="H-display-block H-font-size-14">营业报表</label>
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                <span class="H-icon H-display-block H-horizontal-center"><img
                        src="/static/weui/image/icon/edit.png"/></span>
                    <label class="H-display-block H-font-size-14">信息设置</label>
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                <span class="H-icon H-display-block H-horizontal-center"><img
                        src="/static/weui/image/icon/time.png"/></span>
                    <label class="H-display-block H-font-size-14">营业时间</label>
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                <span class="H-icon H-display-block H-horizontal-center"><img
                        src="/static/weui/image/icon/note.png"/></span>
                    <label class="H-display-block H-font-size-14">小店公告</label>
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                    <span class="H-icon H-display-block H-horizontal-center"><img
                            src="/static/weui/image/icon/commit.png"/></span>
                    <label class="H-display-block H-font-size-14">评论管理</label>
                </div>
            </div>
            <div class="H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-4 H-center-all H-theme-background-color-white H-border-horizontal-right-after H-border-vertical-bottom-after H-padding-vertical-both-10"
                 style="min-height: 80px;">
                <div>
                <span class="H-icon H-display-block H-horizontal-center"><img
                        src="/static/weui/image/icon/help.png"/></span>
                    <label class="H-display-block H-font-size-14">店员管理</label>
                </div>
            </div>
        </div>
    </div>

</div>

<script src="/static/weui/script/H.js" type="text/javascript"></script>

<script type="text/javascript">


    var vm = new Vue({
        el: "#vue",
        data: {
            shop: {
                ShopName: "",
                Description: "加载中",
                Type: "类型"
            }
        },
        mounted: function () {
            this.$nextTick(function () {
                load();
            })
        }
    })


    $("#s").change(function () {
        if ($(this).prop('checked')) {
            var status = 1;
            $.toast("已开启")
        } else {
            var status = 2;
            $.toast("已关闭")
        }

    });


    function load() {

        $.get('/api/master/my_shop_info', function (ret) {

            if (ret.code > 0) {
                setTimeout('$("#s").prop("checked", true)', 1300)
                vm.shop = ret.msg;

                setTimeout('$("#list1").css({"opacity":1,"top":0});', 100);
                setTimeout('$("#pane,#zt").css({"opacity":1,"top":0});', 600);

            } else {
                $.alert(ret.msg)
            }

        });
    }
</script>


<!-- 页面结束 -->
{/block}


{block name="base"}
<div class="panel-overlay"></div>
<div class="panel panel-left panel-reveal theme-dark" id='panel-left'>
    <!-- 左边侧栏开始 -->

    <!-- 左边侧栏结束 -->
</div>
{/block}


{block name="js"}


{/block}